//
//  ffffff_baseViewController.m
//  kratos_framework_Example
//
//  Created by 7yao.top on 2018/10/23.
//  Copyright © 2018年 kratos_framework. All rights reserved.
//

#import "Kratos_baseViewController.h"
#import "k_const.h"
#import "IQKeyboardManager.h"
@interface Kratos_baseViewController ()

@end


@implementation Kratos_baseViewController

- (instancetype)init
{
    self = [super init];
    if (self) {
        if ([[[UIDevice currentDevice] systemVersion] floatValue]>=8.0) {
            self.modalPresentationStyle=UIModalPresentationOverCurrentContext;
        }else{
            self.modalPresentationStyle=UIModalPresentationCurrentContext;
        }
        //
        self.providesPresentationContextTransitionStyle = YES;
        self.definesPresentationContext = YES;
        self.view.backgroundColor = [UIColor clearColor];
        
   
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.Kra_coverView];
    
    [self.Kra_coverView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.top.mas_equalTo(0);
    }];
    
    [[IQKeyboardManager sharedManager]setEnable:true];
    
    
      [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(doRotateAction:) name:UIDeviceOrientationDidChangeNotification object:nil];

}

- (void)doRotateAction:(NSNotification *)notification
{
    
}

- (UIView *)Kra_coverView
{
    if (_Kra_coverView == nil) {
        _Kra_coverView = [[UIView alloc]init];
        _Kra_coverView.backgroundColor = [UIColor clearColor];
    }
    return _Kra_coverView;
}


- (void)dealloc
{
    [[NSNotificationCenter defaultCenter]removeObserver:self];
    kLog(@" %@delloc",self);
}


@end
